package com.example.emos.api.db.dao;

import com.example.emos.api.db.pojo.TbLeave;
import org.apache.ibatis.annotations.Mapper;

import java.util.ArrayList;
import java.util.HashMap;

@Mapper
public interface TbLeaveDao {
    /**
     * 请假分页查询
     * @param param
     * @return
     */
    public ArrayList<HashMap> searchLeaveByPage(HashMap param);
    public long searchLeaveCount(HashMap param);

    /**
     * 定义更新请假记录instance_id字段值
     * @param param
     * @return
     */
    public int updateLeaveInstanceId(HashMap param);

    /**
     * 请假审批
     * @param param
     * @return
     */
    public long searchContradiction(HashMap param);
    public int insert(TbLeave leave);

    /**
     * 删除请假记录
     * @param id
     * @return
     */
    public String searchInstanceIdById(int id);
    public int deleteLeaveById(HashMap param);

    /**
     * 生成请假单
     * @param param
     * @return
     */
    public HashMap searchLeaveById(HashMap param);

}
